<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script type="text/javascript">
        var arr = new Array('A' , 'B' , 'C' ,'D' , 'E' , 'A' , 'A' , 'B');
        console.log('当前数组为：' + arr);
        console.log('用for循环遍历数组并依次输出');
        for(var i = 0; i < arr.lenght; i++ ){
            console.log(arr[i]);
        }
        var count = 0 ;
        for (var i = 0; i < arr.length; i++){
            if(arr[i] == 'A')
            count++;
        }
        console.log('数组中有' + count + '个A元素');
        arr.pop();
        arr.pop();
        arr.shift();
        console.log('删除数组第一个元素，和最后两位元素后效果为' + arr);
    </script>
</body>
</html>